package cn.dlc.com.account.controller;

import cn.dlc.com.account.entity.Account;
import cn.dlc.com.account.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 邓立川
 * @date 2021/1/12 16:47
 * @desc 添加当前类的描述信息
 */
@RestController
@RequestMapping("bank2")
public class AccountController {

    @Autowired
    private AccountService accountService;

    @PostMapping("to")
    public String saveAccount(@RequestBody Account account){

        accountService.save(account);

        return "ok";
    }
}
